package be.bonamis.umpire.ui.client.places;

import java.util.List;

import be.bonamis.projects.umpire.business.dto.GameDTO;
import be.bonamis.projects.umpire.business.dto.UmpireDTO;

import com.google.gwt.place.shared.Place;
import com.google.gwt.place.shared.PlaceTokenizer;

public class HistoryPlace extends Place {

	private String name;
	private UmpireDTO umpire;
	private List<GameDTO> games;

	public static class Tokenizer implements PlaceTokenizer<HistoryPlace> {

		@Override
		public HistoryPlace getPlace(String token) {
			return new HistoryPlace(token,null,null);
		}

		@Override
		public String getToken(HistoryPlace place) {
			return place.getName();
		}

	}

	public HistoryPlace(String token, UmpireDTO dto, List<GameDTO> games) {
		this.name = token;
		this.umpire = dto;
		this.games = games;
	}

	public String getName() {
		return name;
	}

	public UmpireDTO getUmpire() {
		return umpire;
	}
	
	public List<GameDTO> getGames() {
		return games;
	}

}
